package yang.yu.sessioncache;

import java.util.Objects;

/**
 * Created by yyang on 15/9/8.
 */
public class UserInfo {
    private String username;
    private String macAddress;
    private String loginLogId;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getMacAddress() {
        return macAddress;
    }

    public void setMacAddress(String macAddress) {
        this.macAddress = macAddress;
    }

    public String getLoginLogId() {
        return loginLogId;
    }

    public void setLoginLogId(String loginLogId) {
        this.loginLogId = loginLogId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof UserInfo)) {
            return false;
        }
        UserInfo userInfo = (UserInfo) o;
        return Objects.equals(getUsername(), userInfo.getUsername()) &&
                Objects.equals(getMacAddress(), userInfo.getMacAddress()) &&
                Objects.equals(getLoginLogId(), userInfo.getLoginLogId());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getUsername(), getMacAddress(), getLoginLogId());
    }
}
